package com.spring.datasource.multi;

public class DatasourceKeyHolder {

    private static ThreadLocal<String> keyHolder = new ThreadLocal<>();

    public static void setKey(String key){
        keyHolder.set(key);
    }

    public static String getKey(){
        String key = keyHolder.get();

        keyHolder.remove();

        return key;
    }




}
